<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2023/7/18
  Time: 9:12
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
    <h1>欢迎你！</h1>
    <%
        // 1. 为请求对象添加属性
        request.setAttribute("username","张三");
        // 2. 从请求对象移除属性
        request.removeAttribute("username");

        //2. 为session指定属性值
        session.setAttribute("age",20);
        session.removeAttribute("age");

        //3. 为application添加属性值
        application.setAttribute("sname","小明");
        application.removeAttribute("sname");
    %>
</body>
</html>
